import React, { Component } from "react"
import NavBar from "./NavBar"
import NavBar2 from "./NavBar2"

export class App extends Component {
    render() {
        return (
            <div>
                <NavBar>
                    <button>我是右边</button>
                    <h2>我是中间</h2>
                    <i>我是左边</i>
                </NavBar>
                {/* 使用props实现插槽 */}
                <NavBar2
                    leftSlot={<button>我是左边2</button>}
                    centerSlot={<h2>我是中间2</h2>}
                    rightSlot={<i>我是右边2</i>}
                />
            </div>
        )
    }
}

export default App
